#ifndef _ROLLING_H_
#define _ROLLING_H_

#include "Entity.h"
#include "Drawable.h"
#include "Collideable.h"
#include "AnimationManager.h"

class RenderManager;
class Rolling : public Entity, public Drawable, public Collideable
{
public:
	Rolling(float direction = -1.0f);
	~Rolling(void);

	void draw(RenderManager*);

	void move();
	void update();
	void initialize();
	void clean();

	bool canTakeDamage() { return _canTakeDamage; }
	int getDamage() { return _damage; }
	void takeDamage(int damage);
	void kill();

	sf::FloatRect collisionBox(int type = 0);

private:
	void interpolateHitFlash();
	short _interpolation;

	int _health;
	int _totalHealth;
	int _damage;
	
	float _direction;
	float _percent;

	bool _canTakeDamage;
	bool _hitFlash;
	bool _readyToDie;
	
	AnimationManager _anim;

	sf::Shader _shader;
};

#endif // _ROLLING_H_